package com.seu.magicfilter.filter.helper

import com.seu.magicfilter.filter.advanced.*
import com.seu.magicfilter.filter.base.gpuimage.*

class MagicFilterFactory {

    companion object {
        var currentFilterType = MagicFilterType.NONE
            private set

        @JvmStatic
        fun initFilters(type: MagicFilterType): GPUImageFilter? {
            currentFilterType = type
            return when (type) {
                MagicFilterType.WHITECAT -> MagicWhiteCatFilter()
                MagicFilterType.BLACKCAT -> MagicBlackCatFilter()
                MagicFilterType.SKINWHITEN -> MagicSkinWhitenFilter()
                MagicFilterType.MONO -> MagicInkwellFilter()
                MagicFilterType.HEALTHY -> MagicHealthyFilter()
                MagicFilterType.COOL -> MagicCoolFilter()
                MagicFilterType.WARM -> MagicWarmFilter()
                MagicFilterType.SWEETS -> MagicSweetsFilter()
                MagicFilterType.NOSTALGIA -> MagicNostalgiaFilter()
                MagicFilterType.FAIRYTALE -> MagicFairytaleFilter()
                MagicFilterType.SUNRISE -> MagicSunriseFilter()
                MagicFilterType.SUNSET -> MagicSunsetFilter()
                MagicFilterType.SKETCH -> MagicSketchFilter()
                MagicFilterType.BRIGHTNESS -> GPUImageBrightnessFilter()
                MagicFilterType.CONTRAST -> GPUImageContrastFilter()
                MagicFilterType.EXPOSURE -> GPUImageExposureFilter()
                MagicFilterType.HUE -> GPUImageHueFilter()
                MagicFilterType.SATURATION -> GPUImageSaturationFilter()
                MagicFilterType.SHARPEN -> GPUImageSharpenFilter()
                MagicFilterType.IMAGE_ADJUST -> MagicImageAdjustFilter()
                else -> null
            }
        }
    }
}